/**
 * @description 用户管理
 * @author zhu_liangyu
 * @since 2021/12/22
 */

import { OrgServiceApi } from "./_org"
import { AxiosResponse } from "axios"
import { objectToUrlParams } from "/@/utils/common"
import service from "/@/utils/request"


class UserBeanServiceApi extends OrgServiceApi {

    getImportExcelUrl() {
        return this.baseUrl + "/importUserAndDept"
    }

    resetPass(bean: any, params?: any): Promise<AxiosResponse<any>> {
        let url = this.baseUrl + "/resetPass"
        url += objectToUrlParams(params, true)
        return service.post(url, bean)
    }
    // 更换头像 待完善
    updateUserImage(bean: any, params?: any): Promise<AxiosResponse<any>> {
        console.log(this.baseUrl)

        let url = this.baseUrl + "/updateUserImage"
        url += objectToUrlParams(params, true)
        return service.post(url, bean)
    }
    changePass(bean: any, params?: any): Promise<AxiosResponse<any>> {
        console.log(this.baseUrl)

        let url = this.baseUrl + "/changePass"
        url += objectToUrlParams(params, true)
        return service.post(url, bean)
    }
}
const userBeanServiceApi = new UserBeanServiceApi("/UserBeanService")

export default userBeanServiceApi